<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <div id="app" title="counter">
        <p>暗号：first blood</p>
    </div>
    <script src="./kvue.js"></script>
    <script>
        const app = new KVue({
            el: '#app',
            data: {
                counter: 1
            },
            render(h) {
                // const d1 = document.createElement('div')
                // d1.id = 'app'
                // const p1 = document.createElement('p')
                // p1.textContent = this.counter
                // d1.appendChild(p1)
                // return d1
                // return h('div', {id: 'app', title: this.counter}, 
                //     this.counter + ''
                // )
                return h('div', {id: 'app', title: this.counter}, [
                    h('p', null, this.counter + ''),
                    h('p', null, '暗号：first blood')
                ] )
            }
        });

        setInterval(() => {
            app.counter++;
        }, 1000)
    </script>
    
</body>
</html>